﻿using UnityEngine;
using System.Collections;
using tools;

public class ZJHLeaveRoomAlert : MonoBehaviour {

	// Use this for initialization
	void Start () {
		EventTriggerListener.Get (transform.GetChild (2).gameObject).onClick = Leave;
		EventTriggerListener.Get (transform.GetChild (3).gameObject).onClick = Close;
	}

	public void Leave(GameObject go){
		GSocket.Send (ByteFactory.makeByte (621117, null));
	}

	public void Close(GameObject go){
		transform.localPosition = new Vector3(10000,0,0);
	}

	public void ShowView(){
		transform.localPosition = Vector3.zero;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
